<template>
  <div class="home-container">
    <!-- 头部区域 -->
    <div class="home-header">
      <my-header></my-header>
    </div>

    <!-- 主体区域 -->
    <div class="home-main-box">
      <div class="main-left">
        <!-- 左侧边栏区域 -->
        <my-aside></my-aside>
      </div>

      <!-- 右侧内容主体区域 -->
      <div class="home-main-body">
        <!-- 路由的占位符 -->
        <router-view #default="{ Component }">
          <transition
            name="fade"
            enter-active-class="animate__animated animate__bounceInRight"
          >
            <component :is="Component"></component>
          </transition>
        </router-view>
      </div>
    </div>
  </div>
</template>

<script setup>
// 头部区域组件
import MyHeader from '../components/Menu/MyHeader.vue'
// 左侧边栏组件
import MyAside from '../components/Menu/MyAside.vue'
</script>

<style lang="less">
.home-container {
  height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  .home-header {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999;
  }
  .home-main-box {
    width: 100%;
    height: 100%;
    display: flex;

    .main-left {
      position: fixed;
      top: 60px;
      left: 0;
      z-index: 999;
    }
    .home-main-body {
      width: calc(100% - 256px);
      height: calc(100% - 60px);
      position: absolute;
      top: 60px;
      left: 256px;
      padding: 15px;
      box-sizing: border-box;
      flex: 1;
      // overflow: hidden;
    }
  }
}
</style>
